Statistical Hypothesis Testing with SAS and R by Dirk Taeger & Sonja Kuhnt

Statistical Hypothesis Testing with SAS and R by Dirk Taeger & Sonja Kuhnt

Author:Dirk Taeger & Sonja Kuhnt
Language: eng
Format: epub
Publisher: Wiley
Published: 2013-12-23T16:00:00+00:00


SAS code *** Variant 1 ***; proc univariate data=blood_pressure normal; var mmhg; run; *** Variant 2 ***; proc univariate data=blood_pressure; histogram mmhg /normal(mu=130 sigma=19.16691); run;

SAS output

*** Variant 1 **** Tests for Normality Test --Statistic--- -----p Value------ Kolmogorov–Smirnov D 0.117254 Pr > D 0.0587 *** Variant 2 **** Fitted Normal Distribution for mmhg Parameters for Normal Distribution Parameter Symbol Estimate Mean Mu 130 Std Dev Sigma 19.16691 Goodness-of-Fit Tests for Normal Distribution Test ----Statistic----- ------p Value----- Kolmogorov–Smirnov D 0.11725352 Pr > D >0.250

Remarks:

SAS only calculates as test statistic.

Variant 1 calculates the Lilliefors test for normality by using the sample mean and sample variance for standardizing the sample. The keyword normal enables this test.

With the variant 2 the original Kolmogorov–Smirnov test with the option normal of the histogram statement can be calculated; values for the mean and variance have to be provided. Here and are chosen.

The syntax is normal(normal-options). If normal-options is not given or normal(mu=EST sigma=EST) is given the same test is calculated as with variant 1. The following normal-options are valid: mu=value where value is the mean of the normal distribution and sigma=value where value is the standard deviation of the normal distribution. Note, these values are the true parameters of the normal distribution to test against not the sample parameters. This can be seen in the above example. In both variants the same D-statistic is calculated but the p-values are different.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.